//
//  Task_tableViewCell.m
//  EggSteward
//
//  Created by 王道林 on 16/9/5.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import "Task_tableViewCell.h"
#import "Masonry.h"

@interface Task_tableViewCell ()

@end
@implementation Task_tableViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubiew];
    }
    return self;
}

- (void)createSubiew
{
    _lable = [[BaseLabel alloc] init];
    [self.contentView addSubview:_lable];
    
    _iamgeview = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"duigou"]];
    [self.contentView addSubview: _iamgeview];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [_lable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top);
        make.left.mas_equalTo(self.contentView.mas_left).mas_offset(5);
        make.bottom.mas_equalTo(self.contentView.mas_bottom);
        make.width.mas_equalTo(self.contentView.mas_width).multipliedBy(0.5);
    }];
    
    [_iamgeview mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top).mas_offset(20);
        make.right.mas_equalTo(self.contentView.mas_right).mas_offset(-5);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).mas_offset(-20);
        make.width.mas_equalTo(self.contentView.mas_width).multipliedBy(0.05);
    }];
    
}


@end
